package com.pianke.yc.test.Classess;

import org.json.JSONException;
import org.json.JSONObject;


public class Job {
    public int id;
    public String title;
    public String name;
    public String city;
    public String place;
    public String type;
    public String money;
    public String time;
    public String jobcontent;
    public String jobask;
    public String jobcontacts;
    public String jobphone;

    public Job(JSONObject json) {
        try {
            id = Integer.valueOf(json.getString("id"));
            title = json.getString("title");
            name = json.getString("name");
            city = json.getString("city");
            time = json.getString("time");
            place = json.getString("place");
            type = json.getString("type");
            money = json.getString("money");
            time = json.getString("time");
            jobcontent = json.getString("jobcontent");
            jobask = json.getString("jobask");
            jobcontacts = json.getString("jobcontacts");
            jobphone = json.getString("jobphone");
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }

    public JSONObject toJSON() throws JSONException {
        JSONObject json = new JSONObject();
        json.put("id", id + "");
        json.put("title", title);
        json.put("name", name);
        json.put("time", time);
        json.put("city", city);
        json.put("id", id);
        json.put("type", type);
        json.put("place", place);
        json.put("money", money);
        json.put("jobcontent", jobcontent);
        json.put("jobask", jobask);
        json.put("jobcontacts", jobcontacts);
        json.put("jobphone", jobphone);
        return json;
    }
}